import request from "@/utils/request";

// 获取品牌基础列表
export const apiGetBrandList = (page,limit)=>{
  return request({
    method: 'get',
    url: `/admin/product/baseTrademark/${page}/${limit}`
  })
}

// 添加或删除品牌 data: id, logoUrl, tmName  添加无id, 更改必须有id
export const apiAddOrUpdateBrand = (data)=>{
  if(data.id) {
    return request.put('/admin/product/baseTrademark/update',data)
  }else {
    return request.post('/admin/product/baseTrademark/save',data)
  }
}

// 删除品牌 id
export const apiDeleteBrand = (id)=>{
  return request.delete(`/admin/product/baseTrademark/remove/${id}`)
}
